package org.jiang.springbootdemo.demos.web.controller;

import org.jiang.springbootdemo.demos.web.DTO.HelloDTO;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api")

public class HelloController {

    @PostMapping(value = "/hello")
    public Object hello(@RequestBody HelloDTO dto) {

        return "hello" + dto.getName();
    }

}
